package com.jieshuibao.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jieshuibao.mapper.UpVersionMapper;
import com.jieshuibao.model.db.UpVersion;
import com.jieshuibao.model.db.UpVersionExample;

@Service
public class UpVersionService{
	
	@Resource
	private UpVersionMapper upVersionMapper;
	
	public void addUpVersion(UpVersion upVersion) {
		upVersionMapper.insertSelective(upVersion);
	}
	
	public void delUpVersionByUuid(String uuid) {
		upVersionMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateUpVersion(UpVersion upVersion) {
		upVersionMapper.updateByPrimaryKeySelective(upVersion);
	}
	
	public UpVersion getUpVersionByUuid(String uuid) {
		return upVersionMapper.selectByPrimaryKey(uuid);
	}
	
	public List<UpVersion> getPageUpVersion(UpVersionExample upVersionExample) {
		return upVersionMapper.selectPage(upVersionExample);
	}
	
	public int countUpVersion(UpVersionExample upVersionExample) {
		return upVersionMapper.countByExample(upVersionExample);
	}
}
